import request from "@/utils/request";

// 获得门店项目分页
export function get(query) {
  return request({
    url: "/store/item/page",
    method: "get",
    params: query,
  });
}

// // 创建会员账户流水
// export function CreateAccount(data) {
//   return request({
//     url: "/customer/account-statement/create",
//     method: "post",
//     data: data,
//   });
// }

// 门店管理-人员管理
export function getStoreUsers(data) {
  return request({
    url: "/store/store/getStoreUsers",
    method: "post",
    data: data,
  });
}
// 人员管理-设置技能
export function userSettingItem(data) {
  return request({
    url: "/store/user-item/settingItem",
    method: "post",
    data: data,
  });
}

// 职位
export function roleLabel(query) {
  return request({
    url: "store/conf/query/roleLabel",
    method: "POST",
    data: query,
  });
}

// 获取全部项目
export function itemAllList(query) {
  return request({
    url: "/store/item/listAll",
    method: "get",
    params: query,
  });
}

// 用户状态修改
export function changeUserInfoStatus(id, status) {
  const data = {
    id,
    status,
  };
  return request({
    url: "/system/user/update-status",
    method: "put",
    data: data,
  });
}

// 获得门店信息列表
export function getStoreInfoList(data) {
  return request({
    url: "/store/store/list",
    method: "post",
    data: data,
  });
}

// 获得门店数量统计
export function getStoreNum(query) {
  return request({
    url: "/store/store/getStoreNum",
    method: "get",
    params: query,
  });
}

// 修改门店状态列表
export function updateManagestate(data) {
  return request({
    url: "/store/store/update-managestate",
    method: "post",
    data: data,
  });
}

// 门店管理-人员管理之门店员工艺名修改
export function updateStageName(data) {
  return request({
    url: "/store/store/updateInfo",
    method: "post",
    data: data,
  });
}

// 门店管理-获取员工信息
export function getUser(query) {
  return request({
    url: "/store/store/getUser",
    method: "get",
    params: query,
  });
}

// 获得开关门店记录分页
export function getOpenPage(query) {
  return request({
    url: "/store/close-open/page",
    method: "get",
    params: query,
  });
}

// 门店管理-修改店长信息
export function editStoreManagerUser(data) {
  return request({
    url: "/store/store/editStoreManagerUser",
    method: "post",
    data: data,
  });
}

export function getUerAllList(params) {
  return request({
    url: '/system/user/list-by-instatus',
    method: 'get',
    params:params
  })
}

// 门店管理-修改开业时间
export function OpenDate(data) {
  return request({
    url: "/store/store/edit/openDate",
    method: "post",
    data: data,
  });
}

// 刷新缓存
export function FlushCache(data) {
  return request({
    url: "/store/store/flush/cache",
    method: "post",
    data: data,
  });
}

// 门店管理-修改有效期
export function EditExpireDate(data) {
  return request({
    url: "/store/store/edit/expireDate",
    method: "post",
    data: data,
  });
}

// 修改管理费比例
export function UpdateManagerPro(data) {
  return request({
    url: "/store/store/managerPro",
    method: "post",
    data: data,
  });
}

// 门店切割会员卡
export function SplitCard(data) {
  return request({
    url: "/store/store/splitCard",
    method: "post",
    data: data,
  });
}

// 修改美团ID,抖音ID
export function UpdatemtDyAction(data) {
  return request({
    url: "/store/store/mtDy",
    method: "post",
    data: data,
  });
}